A graph is collection of vertices (sometimes referred to as “nodes”) and edges. The nodes of a graph may represent any entity, and an edge may represent a relationship between the nodes connected by the edge. A graph database may be used to store a graph persistently, e.g., on a block storage medium (magnetic or solid state) that has random access capabilities. Each node may have many edges associated therewith. Each edge may have one or more attributes. Edges may be added, deleted, or changed (e.g., new or updated edge attributes), e.g., as relationships between entities represented by nodes of a graph change. Edges may be unidirectional (running from one node to another) or bidirectional (running from each node to the other).
Typically, graph databases have been represented in the form of one or more adjacency matrices. An adjacency matrix may be a square matrix used to represent a finite graph. The elements of the matrix indicate whether pairs of vertices are adjacent or not in the graph, i.e., whether there is an edge or other relationship between them.
A relational database stores data as one or more tables, each comprising rows and columns of data. Each row may be associated with an entity and the columns of that row may store data values for attributes of that entity. Rows are sometimes called “records” or “tuples”. Generally, each table/relation represents one “entity type” (such as customer or product). The rows represent instances of that type of entity (such as “Lee” or “iPhone 6”) and the columns representing values attributed to that instance (such as address or price).
A relational database and uses data set Join (Intersection and Union) theories to infer the relations between entities. Relationships are a logical connection between different tables. A relationship is established on the basis of interaction among these tables. Relationships of arbitrary complexity can be “inferred” using simple Set principles and retrieved using standard Query Language.